package com.fahai.web.dao;

import com.fahai.common.CommonMapper;
import com.fahai.web.entity.CardInfo;
import com.fahai.web.entity.SkuInfo;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * card_info ,sku_info表 DAO
 * Created by lilinjun on 17/5/22.
 */
@Repository
public interface CardInfoDao extends CommonMapper<CardInfo> {

    /**
     * 卡券列表查询
     * @param map
     * @return
     */
    public List selectCardList(Map<String, Object> map);

    public CardInfo selectCardInfoById(Integer tcid);
    /**
     * 向card_info增加记录
     * @param cardInfo
     */
    public void  insertCardSelective(CardInfo cardInfo);

    /**
     * 向sku_info增加
     * @param skuInfo
     */
    public void insertSkuSelective(SkuInfo skuInfo);

    /**
     * 向card_info增加
     * @param cardInfo
     */
    public void   insertCardInfo(CardInfo cardInfo);


    /**
     * sku_info表批量上架
     * @param idlist
     */
    public void batchOnSalesku(List<Integer> idlist);

    /**
     * card_info表批量上架
     * @param idlist
     */
    public void batchOnSalecard(List<Integer> idlist);

    /**
     * sku_info表批量下架
     * @param idlist
     */
    public void batchDownSalesku(List<Integer> idlist);

    /**
     * card_info表批量下架
     * @param idlist
     */
    public void batchDownSalecard(List<Integer> idlist);

    /**
     * 判断下律师是否存在律师表中
     * @param map
     * @return
     */
    public String check(Map<String,Object> map);

}

